package com.ybkj.o2o.zhuanche.service.impl;

import com.ybkj.o2o.zhuanche.entity.OrderGroup;
import com.ybkj.o2o.zhuanche.entity.OrderGroupCriteria;
import com.ybkj.o2o.zhuanche.mapper.BaseMapper;
import com.ybkj.o2o.zhuanche.mapper.OrderGroupMapper;
import com.ybkj.o2o.zhuanche.service.OrderGroupService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class DefaultOrderGroupService extends
    AbstractBaseService<OrderGroup, OrderGroupCriteria, Long> implements OrderGroupService {

  @Autowired
  private OrderGroupMapper orderGroupMapper;

  @Override
  public BaseMapper<OrderGroup, OrderGroupCriteria, Long> getMapper() {
    return orderGroupMapper;
  }

  @Override
  public int insert(OrderGroup orderGroup) {
    orderGroup.setCreated(new Date());
    orderGroup.setUpdated(new Date());
    orderGroup.setTreatment(false);
    return super.insert(orderGroup);
  }

}
